Global Index
HTML5 JS API Index > DOM Tutorials & Specs

CustomEvent

Extends Event.

Events using the CustomEvent interface can be used to carry custom data.

Properties
any
detail
The detail attribute must return the value it was initialized to.
Constructor
CustomEvent(DOMString type, optional CustomEventInit eventInitDict)
Operations
void
initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any detail)
The initCustomEvent(type, bubbles, cancelable, detail) method must initialize the context object with type, bubbles, and cancelable, and then set its detail attribute to detail.